package com.sso.core.conf;

import com.sso.core.entity.ReturnData;


public class SSOConf {

    /**
     * sso ticket, between browser and sso-server (web + token client)
     */
    public static final String SSO_SESSIONID = "ticket";

    /**
     * sso sms login
     */
    public static final String SSO_SMS_CODE = "sms";



    /**
     * redirect url (web client)
     */
    public static final String REDIRECT_URL = "redirect_url";

    /**
     * sso user, request attribute (web client)
     */
    public static final String SSO_USER = "sso_user";


    /**
     * sso server address (web + token client)
     */
    public static final String SSO_SERVER = "sso_server";

    /**
     * login url, server relative path (web client)
     */
    public static final String SSO_LOGIN = "/login";
    /**
     * logout url, server relative path (web client)
     */
    public static final String SSO_LOGOUT = "/logout";

    /**
     * check url,server check user status
     */
    public static final String SSO_CHECK = "/check";


    public static final String SSO_DAPTCHA = "/kaptcha";



    /**
     * logout path, client relatice path
     */
    public static final String SSO_LOGOUT_PATH = "SSO_LOGOUT_PATH";

    /**
     * excluded paths, client relatice path, include path can be set by "filter-mapping"
     */
    public static final String SSO_EXCLUDED_PATHS = "SSO_EXCLUDED_PATHS";


    /**
     * login fail result
     */
    public static final ReturnData<String> SSO_LOGIN_FAIL_RESULT = new ReturnData(501, "sso not login.");


    /**
     * session save kaptcha
     */
    public static final String KAPTCHA_CODE = "KAPTCHA_CODE";
    /**
     * session save kaptcha time default 120 second
     */
    public static final int KAPTCHA_CODE_TIME_SECOND = 120;

    /**
     * ticket save root domain
     */
    public static final String COOKIE_DOMAIN = "COOKIE_DOMAIN";
    /**
     * send sms is enabled
     */
    public static final String SMS_ENABLED = "SMS_ENABLED";
}
